package com.bdk.middle.orchestration.api.client;

import com.bdk.middle.common.result.ResultDO;
import com.bdk.middle.orchestration.api.domain.FunctionModuleDO;
import com.bdk.middle.orchestration.api.query.FunctionModuleQueryDO;
import org.springframework.web.bind.annotation.*;


public interface ModuleClientApi {

    /**
     * 添加模块
     * @param domain 用户DO
     * @return ResultDO
     */
    @RequestMapping(value="/module_cliet_api/add.html", method = RequestMethod.POST)
    public @ResponseBody ResultDO add(@RequestBody FunctionModuleDO domain);

    /**
     * 修改模块信息
     * @param domain 用户DO
     * @return ResultDO
     */
    @RequestMapping(value="/module_cliet_api/edit.html", method = RequestMethod.POST)
    public @ResponseBody ResultDO edit(@RequestBody FunctionModuleDO domain);

    /**
     * 获取模块详情
     * @param id 用户ID
     * @return ResultDO
     */
    @RequestMapping(value="/module_cliet_api/get.html", method = RequestMethod.POST)
    public @ResponseBody ResultDO get(@RequestParam("id") String id);

    /**
     * 删除模块
     * @param id 用户ID
     * @param modifier 修改人用户名
     * @return ResultDO
     */
    @RequestMapping(value="/module_cliet_api/remove.html", method = RequestMethod.POST)
    public @ResponseBody ResultDO remove(@RequestParam("id") String id, @RequestParam("modifier") String modifier);

    /**
     * 查找模块列表分页
     * @param domain 查询DO
     * @return ResultDO
     */
    @RequestMapping(value="/module_cliet_api/find.html", method = RequestMethod.POST)
    public @ResponseBody ResultDO find(@RequestBody FunctionModuleQueryDO domain);

    /**
     * 改变模块上下加状态
     * @param id
     * @param status
     * @return ResultDO
     */
    @RequestMapping(value="/module_cliet_api/updateStatus.html", method = RequestMethod.POST)
    public @ResponseBody ResultDO updateStatus(@RequestParam("id") String id, @RequestParam("status") int status, @RequestParam("modifier") String modifier);

    /**
     * 返回所以上架的模块
     * @return ResultDO
     */
    @RequestMapping(value="/module_cliet_api/getAvailableService.html", method = RequestMethod.POST)
    public @ResponseBody ResultDO getAvailableModule();
}
